﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;

namespace CMS.Class
{
    public class clsDelete
    {
        public clsDelete()
        {
            //
            // TODO: Add constructor logic here
            //
        }


        /// <summary>
        /// Xóa công nợ khi xóa khách hàng
        /// </summary>
        /// <param name="strMAKH"></param>

        public static void DeleteCongNo(String strMAKH)
        {
            QpWebConnec.QpConnec connec = new QpWebConnec.QpConnec(Constant.Connec);
            connec.ExecuteNonQuery("p_CongNo_Del", new SqlParameter("@MAKH", strMAKH));

        }


        /// <summary>
        /// Xóa vật tư hàng hóa trong kho
        /// </summary>
        /// <param name="strMAKH"></param>

        public static void DeleteVTHH(String strMAVTHH)
        {
            QpWebConnec.QpConnec connec = new QpWebConnec.QpConnec(Constant.Connec);
            connec.ExecuteNonQuery("p_VTHH_Del", new SqlParameter("@MAVTHH", strMAVTHH));

        }

        /// <summary>
        /// Xóa chi tiết vật tư
        /// </summary>
        /// <param name="strMAKH"></param>

        public static void DeleteCTVT(String strLOAICT, String strSOCT, int NAM, int THANG)
        {
            QpWebConnec.QpConnec connec = new QpWebConnec.QpConnec(Constant.Connec);
            connec.ExecuteNonQuery("p_CTVT_Del", new SqlParameter("@LOAICT", strLOAICT),
                new SqlParameter("@SOCT", strSOCT), new SqlParameter("@NAM", NAM),
                new SqlParameter("@THANG", THANG));

        }

    }
}